package designmode.Decorate;

/**
 * Created by Administrator on 2017/10/30 030.
 */
public class test
{
    public static void main(String[] args)
    {
        Beverage b1 = new Espresso();
        System.out.println(b1.getDes() + " cost : $" + b1.cost());

        Beverage b2 = new StarBucks();
        b2 = new Mocha(b2);
        b2 = new Mocha(b2);
        b2 = new Whip(b2);
        System.out.println(b2.getDes() + " cost : $" + b2.cost());
    }
}
